package Thread2;

public class Test {
    public static void main(String[] args) {
        int num = 5;
        int num1 = 66;
        JieChengThread jieChengThread = new JieChengThread(num);
        PingFangThread pingFangThread = new PingFangThread(num1);
        jieChengThread.start();//开启线程1,计算阶乘，执行run方法
        pingFangThread.start();//开启线程2,计算阶乘，执行run方法
        try {
//            等待线程执行完毕
            jieChengThread.join();
            pingFangThread.join();
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }

    }

}
